getInsetsIgnoringVisibility

Returns the insets a specific set of windows can cause, denoted by the typeMask bit mask of Types, regardless of whether that type is currently visible or not.

The insets represents the area of a a window that that may be partially or fully obscured by the system window identified by typeMask. This value does not change based on the visibility state of those elements. For example, if the status bar is normally shown, but temporarily hidden, the inset returned here will still provide the inset associated with the status bar being shown.

When running on devices with API Level 29 and before, the returned insets are an approximation based on the information available. This is especially true for the IME type, which currently only works when running on devices with SDK level 23 and above.

Return

The insets.

Parameters

typeMask

Bit mask of Types to query the insets for.

Throws

If the caller tries to query ime. Insets are not available if the IME isn't visible as the height of the IME is dynamic depending on the EditorInfo of the currently focused view, as well as the UI state of the IME.